package thinkingJava.chapter12;

class VeryImportantException extends Exception {
	public String toString() {
		return "A very important Exception";
	}
}
class HohumException extends Exception {
	public String toString() {
		return "A trivial Exception";
	}
}

public class LostMessage {
	void f() throws VeryImportantException {
		throw new VeryImportantException();
	}
	void dispose() throws HohumException {
		throw new HohumException();
	}
	public static void main(String[] args) {
		LostMessage lm = new LostMessage();
		try {
			try {
				lm.f();
			} finally {
				lm.dispose();
			}
		} catch (VeryImportantException e) {
			e.printStackTrace();
		} catch (HohumException e) {
			e.printStackTrace();
		}
	}
}
